<script setup lang="ts">
import { Navigate } from "@/utils";
import { getToken } from "@/utils/Storage";

import Storage from "@/modal/useStorage";
import i18n from '@/main'
const checkLogin = () => {
  if (!getToken) {
    Navigate.redirect('/pages/login')
  }
}
const initApp = () => {
  // 检查用户登录状态
  //#ifdef H5
  checkLogin()
  //#endif
}
onLaunch(() => {
  i18n.global.locale = Storage.get('locale') || 'zh'
  initApp()
  console.log('App Launch')
})
onShow(() => {
  console.log('App Show')
})
onHide(() => {
  console.log('App Hide')
})
</script>

<style lang="scss">
@import '@/static/reset.scss';

.uno-start {
  --un: 0;
}

/* unocss 代码生成在这 */
.uno-end {
  --un: 0;
}

uni-page-wrapper {
  background-color: #F2F2F2;
  padding: 15rpx 0;
  overflow: auto;
}

.search-input {
  margin: 0 15rpx 15rpx;
}

.fixedBtn {
  position: fixed;
  right: 0;
  left: 0;
  margin: auto;
  width: 150rpx;
  bottom: 50rpx;
}

::v-deep .el-form-item--label-top .el-form-item__label {
  font-weight: 600;
}

uni-page-head {
  margin-top: 45rpx;
  .uni-page-head {
  z-index: 10;
  }
}

</style>
